# Contributor: David Florness <david@florness.com>
# Maintainer: David Florness <david@florness.com>
pkgname=gopls
pkgver=0.9.0
pkgrel=0
pkgdesc="Language server for Go programming language"
url="https://github.com/golang/tools/blob/master/gopls"
license="BSD-3-Clause"
arch="all"
options="chmod-clean"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/golang/tools/archive/gopls/v$pkgver.tar.gz"
builddir="$srcdir/tools-$pkgname-v$pkgver/$pkgname"

export GOPATH="$srcdir"

check() {
	cd test
	go test
}

build() {
	go build -trimpath -o dist/gopls
}

package() {
	install -Dm755 dist/gopls "$pkgdir"/usr/bin/gopls
}

sha512sums="
c0dc0fdffec517115acf8e7ce3de1d5357d467f2ea23e070ea800a43a137be67094e69f5f366613dcbb771379818789c2105b2b59f53c04762146876d12f74ea  gopls-0.9.0.tar.gz
"
